package com.billing.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.billing.model.dao.OrganizationBeanMapper;
import com.billing.model.entity.TOrganization;
import com.billing.model.entity.TRoleMembers;
import com.billing.service.OrganizationService;

@Service
public class OrganizationServiceImpl implements OrganizationService {

	
	@Resource
	public OrganizationBeanMapper organizationBeanMapper;
	
	@Override
	public TOrganization getTOrganizationByid(int id) {
		return organizationBeanMapper.getTOrganizationByid(id);
	}

	@Override
	public int updateTOrganization(TOrganization organization) {
		return organizationBeanMapper.updateTOrganization(organization);
	}

	@Override
	public int saveTOraganization(TOrganization organization) {
		return organizationBeanMapper.saveTOrganization(organization);
	}

	@Override
	public int insertMembers(TRoleMembers roleMembers) {
		return organizationBeanMapper.insertMembers(roleMembers);
	}

	@Override
	public List<TOrganization> getTOrganizationByName(String name,int status,String username,int pageSize,int currentPage) {
		return organizationBeanMapper.getTOrganization(name,status,username,pageSize,currentPage);
	}

	@Override
	public int getTORganizationNum(String username) {
		return organizationBeanMapper.getTOganizationNum(username);
	}


}
